package DesignMode.Observer;

/**
 * @author VX5
 * @Title: MJC
 * @ProjectName DataStructure
 * @Description: TODO
 * @date ${DAT}9:32
 */
public class CurrentCondition {
    private float temeperature;
    private float pressure;
    private float humidity;

    //更新天气
    public void update (float temeperature, float pressure, float humidity) {
        this.temeperature = temeperature;
        this.pressure = pressure;
        this.humidity = humidity;
        System.out.println(toString());
    }

    @Override
    public String toString() {
        return "CurrentCondition{" +
                "temeperature=" + temeperature +
                ", pressure=" + pressure +
                ", humidity=" + humidity +
                '}';
    }
}
